<?php
/*
+--------------------------------------------------------------------------
|   AffiliStore 2
|   ========================================
|   Web: http://www.affilistore.com
|   Email: admin (at) affilistore (dot) com
|	License Type: AffiliStore 2 is NOT open source software and limitations apply 
|   Licence Info: Visit AffiliStore website and click on 'Licence'
+--------------------------------------------------------------------------
*/
if (eregi(".inc.php",$HTTP_SERVER_VARS['PHP_SELF']) || eregi(".inc.php",$_SERVER['PHP_SELF'])) {
	echo "<html>\r\n<head>\r\n<title>Forbidden 403</title>\r\n</head>\r\n<body><h3>Forbidden 403</h3>\r\nThe document you are requesting is forbidden.\r\n</body>\r\n</html>";
	exit;
}




$box_content = new XTemplate ("skins/".$configSkin['value']."/styleTemplates/page.tpl");

			if (isset($_GET['subpage'])) {
				if ($pageSubDetails['name'] == NULL) {
				header("HTTP/1.1 301 Moved Permanently");
				header("Location: {$installDir['value']}");
				} else {
				$box_content->assign("PAGETITLE",'<h1>'.$pageSubDetails['name'].'</h1>');
				$box_content->assign("PAGECONTENT",$pageSubDetails['content']);
				}
			} else if (isset($_GET['page'])) {
				if ($pageDetails['name'] == NULL) {
				header("HTTP/1.1 301 Moved Permanently");
				header("Location: {$installDir['value']}");
				} else {
				$box_content->assign("PAGETITLE",'<h1>'.$pageDetails['name'].'</h1>');
				$box_content->assign("PAGECONTENT",$pageDetails['content']);
				}
			} else {
					$box_content->assign("PAGETITLE",'');
					$box_content->assign("PAGECONTENT",$pageDetails['content']);
			}
			
$box_content->assign("SKIN",$configSkin['value']);
$box_content->parse("page");
$box_content = $box_content->text("page");
?>